
<?php

$linkStart 		= $this->currentUrl . '/page/' . $this->first;

$linkPrevious = '#';
if(isset($this->previous)){
	$linkPrevious 	= $this->currentUrl . '/page/' . $this->previous;
}
$linkNext = '#';
if(isset($this->next)){
	$linkNext 		= $this->currentUrl . '/page/' . $this->next;
}

$linkEnd 		= $this->currentUrl . '/page/' . $this->last;

$strPage  = '';
foreach ($this->pagesInRange as $key){
	if($this->current == $key){
		$strPage .= '<span><b>' . $key .'</b></span>';
	}else{
		$linkPage = $this->currentUrl . '/page/' . $key;
		$strPage .= '<a href="' . $linkPage . '">' . $key .'</a>';
	}
}

$page = '&nbsp;&nbsp; Page ' . $this->current .' /' . $this->last;
?>

<?php if ($this->last>0) {
?>

	<ul>
<?php if ($this->current > 1) { ?>
	<li class="previous"><span class="span-page"><a class="btn btn-info" href="<?php echo $linkStart;?>" title="Start"><i class="icon-fast-backward icon-white"></i></a></span></li>
	<li class="previous"><span class="span-page"><a class="btn btn-info" href="<?php echo $linkPrevious;?>" title="Prev"><i class="icon-step-backward icon-white"></i></a></span></li>
<?php } else { ?>
	<li class="disabled"><span class="span-page"><a class="btn disabled" href="#" title="Start" ><i class="icon-fast-backward icon-white"></i></a></span></li>
	<li class="disabled"><span class="span-page"><a class="btn disabled" href="#" title="Prev"><i class="icon-step-backward icon-white"></i></a></span></li>
<?php } ?>
	<li><?php echo $strPage;?></li>
<?php if ($this->current < $this->last) { ?>
	<li class="next"><span class="span-page"><a class="btn btn-info" href="<?php echo $linkNext;?>" title="Next" ><i class="icon-step-forward icon-white"></i></a></span></li>
	<li class="next"><span class="span-page"><a class="btn btn-info" href="<?php echo $linkEnd;?>" title="End" ><i class="icon-fast-forward icon-white"></i></a></span></li>
<?php } else { ?>
	<li class="disabled"><span class="span-page"><a class="btn disabled" href="#" title="Next"><i class="icon-step-forward icon-white"></i></a></span></li>
	<li class="disabled"><span class="span-page"><a class="btn disabled" href="#" title="End"><i class="icon-fast-forward icon-white"></i></a></span></li>
<?php } ?>

	
</ul>
<div style="float: right; padding-top: 5px;"><?php echo $page;?></div> 
<?php }?>